<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>

    </title>
   
</head>
<body>
    <button onclick="alert('haha')">ceshi</button>
</body>
<!--外部脚本-->
 <script  src="test.js">
     /* 内部脚本 写在body后面*/
     
    </script>
</html>